wayland/surface: Clear has_uncommitted_ack_configure when hiding
authorJonas Ådahl <jadahl@gmail.com>
Thu, 15 Oct 2020 12:52:57 +0000 (14:52 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Thu, 15 Oct 2020 12:56:06 +0000 (14:56 +0200)
The 'has_uncommitted_ack_configure' state was added to make sure we're
responding to 'xdg_surface.configure' events with
'xdg_surface.ack_configure' requests, as is necessary according to spec.
What we didn't do was to clear this state when hiding, meaning that if
we hid the surface after a configure event, but before the frame
finished and we processed the 'has_uncommitted_ack_configure', we'd try
to acknowledge the surface configuration after having destroyed the
surface.

Closes: #3262
gdk/wayland/gdksurface-wayland.c

index 0d8fe2fe7480a89a47cf96aab0f9f6abc1c22e2c..cabb82379cbfc1f90b2e3ddf1c1563d97288aae9 100644 (file)
@@ -2799,6 +2799,8 @@ gdk_wayland_surface_hide_surface (GdkSurface *surface)
       g_clear_pointer (&impl->popup.layout, gdk_popup_layout_unref);
     }
 
+  impl->has_uncommitted_ack_configure = FALSE;
+
   unset_transient_for_exported (surface);
 
   _gdk_wayland_surface_clear_saved_size (surface);